package com.book.util;
/**
 * 文件工具包
 * @author Administrator
 *
 */
public class FileUtil {
	public static String getaFileName(String file){
		
		int fileIndex=file.indexOf("filename=");
		int lastIndex = file.lastIndexOf('\"');
		String filaName= file.substring(fileIndex+10, lastIndex);
		return filaName;
	}
	public static String getFileType(String file){
		String fileName=getaFileName(file);
		int index= fileName.indexOf(".");
		return fileName.substring(index);
	}
}
